<?php
/**
 * 小邮筒订单
 */
namespace soa\minpost\order\v1;

use soa\client;
class orderOperate  extends client{
	/**
	 * 服务地址
	 * @var string
	 */
	public $service_url = 'http://mp.kuaidihelp.com/';
	/**
	 * 服务名称
	 * @var string
	 */
	protected $service_name = 'kuaidihelp_mp';

	//下单
	public function orderPlace($info){
		return $this->post("api/cloudPrint/order/v1/orderOperate/orderPlace",$info);
	}

	//下单
	public function updateOrder($where,$update){
		return $this->post("api/cloudPrint/order/v1/orderOperate/updateOrder",["where" => $where,"condition" => $update]);
	}

	//查询订单信息
	public function orderInfoByOrderId($order_id){
		return $this->post("api/cloudPrint/order/v1/orderOperate/orderInfoByOrderId",compact('order_id'));
	}

	//批量下单
	public function batchOrderPlace($data){
		return $this->post("api/cloudPrint/order/v1/orderOperate/batchOrderPlace",$data);
	}

	//获取批号
	public function batchNo($uid){
		return $this->post("api/cloudPrint/order/v1/orderOperate/batchOrderPlace",compact('uid'));
	}

	//获取订单列表
	public function orderList($info){
		return $this->post("api/cloudPrint/order/v1/orderOperate/orderList",[
			"uid" => is_array($info) && isset($info["uid"]) && !empty($info["uid"]) ? $info["uid"] : "",
			"platform" => is_array($info) && isset($info["platform"]) && !empty($info["platform"]) ? $info["platform"] : "",
			"agent_guid" => is_array($info) && isset($info["agent_guid"]) && !empty($info["agent_guid"]) ? $info["agent_guid"] : "",
			"search_value" => is_array($info) && isset($info["search_value"]) && !empty($info["search_value"]) ? $info["search_value"] : "",
			"search_status" => is_array($info) && isset($info["search_status"]) && !empty($info["search_status"]) ? $info["search_status"] : 0,
			"limit" => is_array($info) && isset($info["limit"]) && !empty($info["limit"]) ? $info["limit"] : [],
		]);
	}
}